package department.fc.domain;

import java.io.Serializable;

public class Department implements Serializable{

	private int departmentNum;
	private String departmentName;
	private String chiefName;
	private int departmentNumOfPeople;
	private String location;
	
	public Department(){}
	
	public Department(int departmentNum, String departmentName,
			String chiefName, int departmentNumOfPeople, String location) {
		super();
		this.departmentNum = departmentNum;
		this.departmentName = departmentName;
		this.chiefName = chiefName;
		this.departmentNumOfPeople = departmentNumOfPeople;
		this.location = location;
	}

	public int getDepartmentNum() {
		return departmentNum;
	}

	public void setDepartmentNum(int departmentNum) {
		this.departmentNum = departmentNum;
	}

	public String getDepartmentName() {
		return departmentName;
	}

	public void setDepartmentName(String departmentName) {
		this.departmentName = departmentName;
	}

	public String getChiefName() {
		return chiefName;
	}

	public void setChiefName(String chiefName) {
		this.chiefName = chiefName;
	}

	public int getDepartmentNumOfPeople() {
		return departmentNumOfPeople;
	}

	public void setDepartmentNumOfPeople(int departmentNumOfPeople) {
		this.departmentNumOfPeople = departmentNumOfPeople;
	}

	public String getLocation() {
		return location;
	}

	public void setLocation(String location) {
		this.location = location;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((chiefName == null) ? 0 : chiefName.hashCode());
		result = prime * result
				+ ((departmentName == null) ? 0 : departmentName.hashCode());
		result = prime * result + departmentNum;
		result = prime * result + departmentNumOfPeople;
		result = prime * result
				+ ((location == null) ? 0 : location.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Department other = (Department) obj;
		if (chiefName == null) {
			if (other.chiefName != null)
				return false;
		} else if (!chiefName.equals(other.chiefName))
			return false;
		if (departmentName == null) {
			if (other.departmentName != null)
				return false;
		} else if (!departmentName.equals(other.departmentName))
			return false;
		if (departmentNum != other.departmentNum)
			return false;
		if (departmentNumOfPeople != other.departmentNumOfPeople)
			return false;
		if (location == null) {
			if (other.location != null)
				return false;
		} else if (!location.equals(other.location))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "Department [departmentNum=" + departmentNum
				+ ", departmentName=" + departmentName + ", chiefName="
				+ chiefName + ", departmentNumOfPeople="
				+ departmentNumOfPeople + ", location=" + location + "]";
	}

	
}
